<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>店铺管理</title>
    <link href="http://127.0.0.1:8080/order/statics/css/note.css" rel="stylesheet">

    <link href="http://127.0.0.1:8080/order/statics/sweetalert/sweetalert2.min.css" rel="stylesheet">
    <script src="http://127.0.0.1:8080/order/statics/js/jquery-1.11.3.js"></script>

    <script src="http://127.0.0.1:8080/order/statics/sweetalert/sweetalert2.min.js"></script>
    <script src="http://127.0.0.1:8080/order/statics/js/util.js"></script>
    <link href="http://127.0.0.1:8080/order/statics/bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="http://127.0.0.1:8080/order/statics/bootstrap/js/bootstrap.js"></script>

    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
            background: url(http://127.0.0.1:8080/order/statics/images/bg.gif) repeat;
        }
    </style>

</head>
<body>


<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" style="font-size:25px" href="main">点餐系统-我的店铺</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
<%--    主页:分页显示菜品 --%>
                <li <c:if test="${navName=='index'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/sub/goIndex.do"><i class="glyphicon glyphicon-cloud"></i>&nbsp;主页</a></li>
<%--    添加菜品--%>
                <li <c:if test="${navName=='addFood'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/sub/goAddFood.do"><i class="glyphicon glyphicon-pencil"></i>&nbsp;添加菜品</a></li>
<%--    菜品管理--%>
                <li <c:if test="${navName=='manage'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/sub/goFood.do"><i class="glyphicon glyphicon-list"></i>&nbsp;菜品管理</a></li>
<%--    我的店铺        --%>
                <li <c:if test="${navName=='person'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/sub/goPerson.do"><i class="glyphicon glyphicon-user"></i>&nbsp;个人中心</a>
<%--    数据报表            --%>
                <li <c:if test="${navName=='report'}"> class="active" </c:if> ><a href="${pageContext.request.contextPath}/sub/goReport.do"><i class="glyphicon glyphicon-signal"></i>&nbsp;数据报表</a></li>
            </ul>
            <form class="navbar-form navbar-right" role="search" action="${pageContext.request.contextPath}/sub/goIndex/findFoodByName.do">
                <div class="form-group">
<%--设置隐藏域记载请求域信息--%>
                    <input type="hidden" id="sid" value="${shop.id}">
                    <input type="text" name="name" class="form-control" placeholder="搜索菜品" value="${foodName}">
                </div>
                <button type="submit" class="btn btn-default">查询</button>
            </form>
        </div>
    </div>
</nav>


<div class="container">
    <div class="row-fluid">
        <div class="col-md-3">
            <div class="data_list">
                <%--我的店铺--%>
            </div>
            <div class="data_list">
                <%--类别--%>
            </div>
            <div class="data_list">
            </div>
        </div>
    </div>

<%--    加载主页--%>
<%--    <c:if test="${menuPage=='index'}">--%>
<%--        应该直接写uri，前端拼的不太方便--%>
<%--        <jsp:include page="${controllerPath}"/>--%>
<%--    </c:if>--%>

<%--    如果考虑后端完美的情况下--%>
    <%
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println(request.getAttribute("uri"));%>
    <jsp:include page="${uri}"/>
<%--    尝试加载登录后第一次进主页的功能--%>
    <c:if test="${!empty firstGo}">
        <jsp:include page="/goLoginHistory.do"></jsp:include>
    </c:if>

</div>

</body>
</html>
